package com.lottry.acra;

import android.app.Application;

import org.acra.ACRA;
import org.acra.ReportingInteractionMode;
import org.acra.config.ACRAConfiguration;
import org.acra.config.ACRAConfigurationException;
import org.acra.config.ConfigurationBuilder;

public class LocalReporter
{
    public static void init(Application application)
    {
        try
        {
            final ACRAConfiguration config = new ConfigurationBuilder(application)
                            .setReportSenderFactoryClasses(LocalReportSenderFactory.class)
                            .setReportingInteractionMode(ReportingInteractionMode.SILENT)
                            .setIncludeDropboxSystemTags(true)
                            .setAdditionalDropboxTags("system_app_anr", "system_app_crash")

                            .build();

            ACRA.init(application, config);
        }
        catch (ACRAConfigurationException e)
        {
            e.printStackTrace();
        }
    }

}
